package com.ctrip.ec.api.mobile.model.payment;

import com.ctrip.ec.biz.entity.cart.CartEntity;
import com.ctrip.ec.biz.entity.goods.GoodsSpecEntity;

/**
 * Created by jiangzy on 2018/9/29.
 */
public class CartListModel extends CartEntity {
    private CartGoodsModel goods;
    private GoodsSpecEntity goodsSpec;


    public GoodsSpecEntity getGoodsSpec() {
        return goodsSpec;
    }

    public void setGoodsSpec(GoodsSpecEntity goodsSpec) {
        this.goodsSpec = goodsSpec;
    }

    public String getSpecName() {
        return goodsSpec.getName();
    }

    public void setSpecName(String specName) {
        this.goodsSpec.setName(specName);
    }

    public String getSpecTitle() {
        return goods.getSpecTitle();
    }

    public void setSpecTitle(String specTitle) {
        this.goods.setSpecTitle(specTitle);
    }

    public  CartListModel(){}
    public  CartListModel(CartEntity entity){
        for(String col : entity.property().getColumns()){
            this.fieldValue(col,entity.fieldValue(col));
        }
//        goods = new CartGoodsModel();
//        goodsSpec = new GoodsSpecEntity();
    }

    public CartGoodsModel getGoods() {
        return goods;
    }

    public void setGoods(CartGoodsModel goods) {
        this.goods = goods;
    }
}
